<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>ht&#39;s Scheme Interpreter: test/biginttest.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ht&#39;s Scheme Interpreter
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">a simplified scheme interpreter implementation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('biginttest_8cpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">biginttest.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="biginttest_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">ifdef</span> INTEST</div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor">&quot;utility/bigint.hpp&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor">&lt;</span><span class="preprocessor">iostream</span><span class="preprocessor">&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor">&lt;</span><span class="preprocessor">string</span><span class="preprocessor">&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keyword">using</span> <span class="keyword">namespace</span> std;</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="keywordtype">int</span> <a class="code" href="cli_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>()</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;{</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;    <a class="code" href="class_big_int.html">BigInt</a> a<a class="code" href="class_big_int.html#a4421e6c1883874512f1b04543dafc64a">(</a>24324215<a class="code" href="class_big_int.html#a4421e6c1883874512f1b04543dafc64a">)</a>, b<a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">(</a><span class="stringliteral">&quot;-2432415455435&quot;</span><a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">)</a>;</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;    cout&lt;&lt;a&lt;&lt;endl;</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    cout&lt;&lt;b&lt;&lt;endl;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;    cout&lt;&lt;(a <a class="code" href="class_big_int.html#a5768b8d21f3cc80a85cdea09a8769a22">+=</a> b)&lt;&lt;endl;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    cout&lt;&lt; a<a class="code" href="class_big_int.html#a468c8997e2ec45ef37d5ff32becc5818">+</a>123 &lt;&lt;endl;</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    cout&lt;&lt; a<a class="code" href="class_big_int.html#a64ef59813d4221635ae33f8de10f88cb">-</a>12450 &lt;&lt;endl;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <a class="code" href="class_big_int.html">BigInt</a> c;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i&lt;10;++i)</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    {</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        c<a class="code" href="class_big_int.html#aaf4a32e323d4f67fc6c04462ed812461">*=</a>10;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        c<a class="code" href="class_big_int.html#a5768b8d21f3cc80a85cdea09a8769a22">+=</a>i;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    }</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    cout&lt;&lt;c&lt;&lt;endl;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    cout &lt;&lt; c<a class="code" href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">*</a> <a class="code" href="class_big_int.html#a56350bc8395ed38c2afdbb4554e56b1f">-</a>c &lt;&lt;endl;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    cout&lt;&lt; (<a class="code" href="class_big_int.html">BigInt</a><a class="code" href="class_big_int.html#a4421e6c1883874512f1b04543dafc64a">(</a>2247192) <a class="code" href="class_big_int.html#a4631ce319f6617a43a4dc89127953ebb">&gt;</a> 12345) &lt;&lt;endl;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    cout &lt;&lt; c<a class="code" href="class_big_int.html#ab5679019b8821c01b161147495e21a4e">/</a>276 &lt;&lt;endl;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    cout &lt;&lt; c<a class="code" href="class_big_int.html#ae9bbf1128217cb469123350f92e4c62f">%</a>277 &lt;&lt;endl;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <a class="code" href="class_big_int.html">BigInt</a> d<a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">(</a><span class="stringliteral">&quot;1234567890123456789&quot;</span><a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">)</a>, e<a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">(</a><span class="stringliteral">&quot;277277277&quot;</span><a class="code" href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">)</a>;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    cout&lt;&lt;d<a class="code" href="class_big_int.html#ae9bbf1128217cb469123350f92e4c62f">%</a>e&lt;&lt;endl;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    cout&lt;&lt;<a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">gcd</a><a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">(</a>d<a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">,</a>e<a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">)</a>&lt;&lt;endl;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    cout&lt;&lt;<a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">gcd</a><a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">(</a><a class="code" href="class_big_int.html">BigInt</a><a class="code" href="class_big_int.html#a4421e6c1883874512f1b04543dafc64a">(</a>90423409128)<a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">,</a><a class="code" href="class_big_int.html">BigInt</a><a class="code" href="class_big_int.html#a4421e6c1883874512f1b04543dafc64a">(</a>238903485493212)<a class="code" href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">)</a>&lt;&lt;endl;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;}</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#</span><span class="preprocessor">endif</span></div>
<div class="ttc" id="class_big_int_html_abe13ffcbf871ddb97365a73120ca0b6f"><div class="ttname"><a href="class_big_int.html#abe13ffcbf871ddb97365a73120ca0b6f">BigInt::BigInt</a></div><div class="ttdeci">BigInt(const std::string &amp;s)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00025">bigint.cpp:25</a></div></div>
<div class="ttc" id="class_big_int_html_aa4e3204ae4a0c81e8e33d0a848078a8d"><div class="ttname"><a href="class_big_int.html#aa4e3204ae4a0c81e8e33d0a848078a8d">BigInt::operator*</a></div><div class="ttdeci">BigInt operator*(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00278">bigint.cpp:278</a></div></div>
<div class="ttc" id="cli_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="cli_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition:</b> <a href="cli_8cpp_source.html#l00022">cli.cpp:22</a></div></div>
<div class="ttc" id="class_big_int_html_a4631ce319f6617a43a4dc89127953ebb"><div class="ttname"><a href="class_big_int.html#a4631ce319f6617a43a4dc89127953ebb">BigInt::operator&gt;</a></div><div class="ttdeci">bool operator&gt;(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00133">bigint.cpp:133</a></div></div>
<div class="ttc" id="bigint_8cpp_html_aa1e6ea48e6ed1d605d5f45ed64053273"><div class="ttname"><a href="bigint_8cpp.html#aa1e6ea48e6ed1d605d5f45ed64053273">gcd</a></div><div class="ttdeci">BigInt gcd(BigInt a, BigInt b)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00376">bigint.cpp:376</a></div></div>
<div class="ttc" id="class_big_int_html"><div class="ttname"><a href="class_big_int.html">BigInt</a></div><div class="ttdef"><b>Definition:</b> <a href="bigint_8hpp_source.html#l00011">bigint.hpp:11</a></div></div>
<div class="ttc" id="class_big_int_html_a4421e6c1883874512f1b04543dafc64a"><div class="ttname"><a href="class_big_int.html#a4421e6c1883874512f1b04543dafc64a">BigInt::BigInt</a></div><div class="ttdeci">BigInt(long long num)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00020">bigint.cpp:20</a></div></div>
<div class="ttc" id="class_big_int_html_a5768b8d21f3cc80a85cdea09a8769a22"><div class="ttname"><a href="class_big_int.html#a5768b8d21f3cc80a85cdea09a8769a22">BigInt::operator+=</a></div><div class="ttdeci">BigInt &amp; operator+=(const BigInt &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00202">bigint.cpp:202</a></div></div>
<div class="ttc" id="class_big_int_html_ab5679019b8821c01b161147495e21a4e"><div class="ttname"><a href="class_big_int.html#ab5679019b8821c01b161147495e21a4e">BigInt::operator/</a></div><div class="ttdeci">BigInt operator/(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00358">bigint.cpp:358</a></div></div>
<div class="ttc" id="class_big_int_html_aaf4a32e323d4f67fc6c04462ed812461"><div class="ttname"><a href="class_big_int.html#aaf4a32e323d4f67fc6c04462ed812461">BigInt::operator*=</a></div><div class="ttdeci">BigInt &amp; operator*=(const BigInt &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00303">bigint.cpp:303</a></div></div>
<div class="ttc" id="class_big_int_html_a56350bc8395ed38c2afdbb4554e56b1f"><div class="ttname"><a href="class_big_int.html#a56350bc8395ed38c2afdbb4554e56b1f">BigInt::operator-</a></div><div class="ttdeci">BigInt operator-() const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00095">bigint.cpp:95</a></div></div>
<div class="ttc" id="class_big_int_html_ae9bbf1128217cb469123350f92e4c62f"><div class="ttname"><a href="class_big_int.html#ae9bbf1128217cb469123350f92e4c62f">BigInt::operator%</a></div><div class="ttdeci">BigInt operator%(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00370">bigint.cpp:370</a></div></div>
<div class="ttc" id="class_big_int_html_a468c8997e2ec45ef37d5ff32becc5818"><div class="ttname"><a href="class_big_int.html#a468c8997e2ec45ef37d5ff32becc5818">BigInt::operator+</a></div><div class="ttdeci">BigInt operator+(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00264">bigint.cpp:264</a></div></div>
<div class="ttc" id="class_big_int_html_a64ef59813d4221635ae33f8de10f88cb"><div class="ttname"><a href="class_big_int.html#a64ef59813d4221635ae33f8de10f88cb">BigInt::operator-</a></div><div class="ttdeci">BigInt operator-(const BigInt &amp;b) const </div><div class="ttdef"><b>Definition:</b> <a href="bigint_8cpp_source.html#l00271">bigint.cpp:271</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_13e138d54eb8818da29c3992edef070a.html">test</a></li><li class="navelem"><a class="el" href="biginttest_8cpp.html">biginttest.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
